import request from '@/utils/request'

// 查询岗位列表
export function listOrg(query) {
  return request({
    url: '/system/org/list',
    method: 'get',
    params: query
  })
}

// 查询岗位详细
export function getOrg(postId) {
  return request({
    url: '/system/org/' + postId,
    method: 'get'
  })
}

// 新增岗位
export function addOrg(data) {
  return request({
    url: '/system/org',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateOrg(data) {
  return request({
    url: '/system/org',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delOrg(postId) {
  return request({
    url: '/system/org/' + postId,
    method: 'delete'
  })
}

//产品批次
export function productNo(params) {
  return request({
    url: '/system/entry/list',
    method: 'get',
    params
  })
}

export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data
  })
}
export function editOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data
  })
}
export function workLst(fEntryId) {
  return request({
    url: '/system/list/'+fEntryId,
    method: 'get',
  })
}
export function taskLst(fEntryId) {
  return request({
    url: '/system/task/'+fEntryId,
    method: 'get',
  })
}
export function waitLst(params) {
  return request({
    url: '/system/wait/list',
    method: 'get',
    params
  })
}
export function planLst() {
  return request({
    url: '/system/plan/list',
    method: 'get',
  })
}
export function pictureLst(query) {
  return request({
    url: '/system/picture/list',
    method: 'get',
    params: query
  })
}
//fPictureUrl fPictureName
export function picture(data) {
  return request({
    url: '/system/picture',
    method: 'post',
    data: data
  })
}
